import { ajax } from '@/utils'

const baseUrl = '/auth'

export default {
  login(...args: ILoginReq): Promise<ILoginRes> {
    return ajax.post(`${baseUrl}/login`, args[0])
  },
  logout(): IVoidRes {
    return ajax.post(`${baseUrl}/logout`)
  },
  getCaptcha(): Promise<IGetCaptchaRes> {
    return ajax.get(`${baseUrl}/captcha`)
  }
}
